package com.jsbs.iam.ident.service;

import com.github.pagehelper.PageInfo;
import com.jsbs.iam.ident.dto.BlacklistManagementPageDto;
import com.jsbs.iam.ident.dto.ExceptionLoginStrategyPageDto;
import com.jsbs.iam.ident.entity.IamBlacklistManagement;
import com.jsbs.iam.ident.entity.IamExceptionLoginStrategy;
import com.jsbs.iam.ident.vo.IamBlacklistManagementVo;
import com.jsbs.iam.ident.vo.IamExceptionLoginStrategyVo;

import java.util.List;


/**
 * @author zhouxiangyang
 * @className IamExceptionLoginStrategyService
 * @date 2022/12/20 17:18
 * @description:
 */
public interface IamExceptionLoginStrategyService {

    /**
     * 异常登录策略分页查询
     * @return
     */
    PageInfo<IamExceptionLoginStrategyVo> getExceptionLoginStrategyPage(ExceptionLoginStrategyPageDto pageDto,
                                                                        String companyCode);

    /**
     * 异常登录策略搜索
     * @param code
     * @return
     */
    List<IamExceptionLoginStrategy> getExceptionLoginStrategyList(String code);

    /**
     * 新增登录策略
     * @return
     */
    int saveExceptionLoginStrategy (IamExceptionLoginStrategy iamExceptionLoginStrategy) throws Exception;

    /**
     * 异常登录策略更新
     * @param iamExceptionLoginStrategy
     * @return
     */
    int updateExceptionLoginStrategy (IamExceptionLoginStrategy iamExceptionLoginStrategy) throws Exception;

    /**
     * 异常登录策略删除
     * @param list
     * @return
     */
    int deleteExceptionLoginStrategy (List<String> list,String companyCode);

    /**
     * 黑名单分页查询和搜索
     * @param pageDto
     * @return
     */
    PageInfo<IamBlacklistManagementVo> getBlacklistManagementPage(BlacklistManagementPageDto pageDto);

    /**
     * 新增黑名单
     * @param iamBlacklistManagements
     * @return
     */
    int saveBlacklistManagement (List<IamBlacklistManagement> iamBlacklistManagements);

    /**
     * 删除/批量删除黑名单
     * @param userId
     * @return
     */
    int deleteBlacklistManagement (List<String> userId);
}
